package com.xqx.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

/**
 * @author：xingquanxiang createTime：2019/10/2 18:57
 * description:
 */
public class MyAspect {

    public void before(){
        System.out.println("前置增强。。。。");
    }


    public void after(){
        System.out.println("最终增强。。。。");
    }

    public void afterReturning(){
        System.out.println("后置增强。。。。");
    }
    //ProceedingJoinPoint 正在执行的连接点
    public Object around(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("环绕前增强。。。。。");
        //切点方法
        Object proceed = pjp.proceed();
        System.out.println("环绕后增强。。。。。");
        return proceed;
    }

    public void afterThrowing(){
        System.out.println("抛出异常增强。。。");
    }
}
